<template>
  <div>
    <img :src="url" class="img" alt="">
  </div>
</template>
<script setup>
import { useRoute } from 'vue-router'
import { getNewsDetail } from '@/api.js'
import { ref } from 'vue'
const route = useRoute()
let id = route.query.id
const url = ref('')
getNewsDetail({
  news_id: id
}).then(res=>{
  url.value = res.data.image
})
</script>
<style scoped>
.img {
  width: 100%;
}
</style>